<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>标签选择器</title>
  <style>
    #usernameErrorMsg{
      color: red;
      font-size: 12px;
    }

  /*上面为id选择器，标签选择器的范围更为广泛*/

    div{
      background-color: black;
      border: 1px solid red;
      width: 100px;
      height: 100px;
    }

    /*下面这个为类名选择器*/
    .myclass{
      border: 1px solid cornflowerblue;
      width: 400px;
      height: 30px;
    }
  </style>
</head>
<body>
<!--
   设置样式字体大小为12px，颜色为红色
-->
<span id="usernameErrorMsg">对不起，用户名不能为空</span>

<div></div>
<div></div>
<div></div>

<br><br>

<input type="text" class="myclass">

<br><br>

<select class="myclass">
  <option>专科</option>
  <option>本科</option>
</select>
</body>
</html>